package cz.mendelu.swi2.spravaUzivatelu.model;

public class User implements IUser {
	private String email;
	private String password;
	private Role role;
	private int id;

	public User(String email, String password, Role role) {		
		this.email = email;
		this.password = password;
		this.role = role;

	}

	@Override
	public String getEmail() {
		return email;
	}

	@Override
	public String getPassword() {
		return password;
	}

	@Override
	public Role getRole() {
		return role;
	}

	@Override
	public void setRole(Role role) {
		this.role = role;
	}

	@Override
	public void setPassword(String password) {
		this.password = password;

	}

	@Override
	public int getId() {
		return this.id;
	}

	@Override
	public void setId(int id) {
		this.id = id;
	}

	@Override
	public boolean isTeacher() {
		return getRole()==Role.teacher;		
	}
}
